<template>
  <el-row type="flex" justify="space-between" align="middle" class="block">
    <div class="page">
      <div class="page-total">
        <!-- <span>共{{ total }}条记录</span>
        <span>第{{ page.pageIndex }}/{{ totalPage }}页</span> -->
        <slot name="pager" />
      </div>
    </div>
    <el-pagination
      v-if="total > 0"
      :current-page.sync="page.pageIndex"
      :page-size.sync="page.pageSize"
      background
      layout=" prev, next,slot"
      prev-text="上一页"
      next-text="下一页"
      :total="total"
      @current-change="getRoleList"
      @size-change="getRoleList"
    />
  </el-row>
</template>

<script>
export default {
  props: {
    page: {
      type: Object,
      required: true
    },
    total: {
      type: Number,
      default: 0
    }

  },
  data() {
    return {

    }
  },
  methods: {
    // 获取列表数据
    getRoleList() {}
  }

}
</script>

<style lang="scss">
.block{
   margin-top:10px
}
</style>
